package io.renren.modules.app.indexController;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
import io.renren.modules.app.entity.index.YcRecruitEntity;
import io.renren.modules.app.service.YcRecruitService;
import io.renren.modules.app.service.YcRecruitTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping ("index")
public class index {

    @Autowired
    private YcRecruitService ycRecruitService;

    @PostMapping("/indexed")
    public R into(@RequestParam Map<String, Object> params){




        Map<String, Object> resultMap = new HashMap<>();


        List<YcRecruitEntity> ycRecruitEntityList =ycRecruitService.bidList(params);
        resultMap.put("bidList",ycRecruitEntityList);

        List<YcRecruitEntity> ycRecruitEntityList2 = ycRecruitService.recruitList(params);
        resultMap.put("recruitList",ycRecruitEntityList2);



        return R.ok().put("bidList",ycRecruitEntityList).put("recruitList",ycRecruitEntityList2);





    }




}
